import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'

import app from './modules/app'
import settings from './modules/settings'
import user from './modules/user'
import routes from './modules/routes'
Vue.use(Vuex)

const store = new Vuex.Store({
  modules: {
    app,
    settings,
    user,
    routes
  },
  getters // 此处挂载了全局的getters, 是为了在组件/模块中方便访问 不再需要使用[]写法访问
  //      模块中挂载getters访问 $store.getters['user/num']
})

export default store
